<html>
<head><meta charset="utf-8"><title>hir? · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/hir.3F.html">hir?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="186176201"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/hir%3F/near/186176201" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> std::Veetaha <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/hir.3F.html#186176201">(Jan 21 2020 at 12:02)</a>:</h4>
<p>Can someone please explain what <code>hir</code> stands for? Where did these letters come from?</p>



<a name="186176342"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/hir%3F/near/186176342" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/hir.3F.html#186176342">(Jan 21 2020 at 12:04)</a>:</h4>
<p>high-level intermediate language</p>



<a name="186176367"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/hir%3F/near/186176367" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/hir.3F.html#186176367">(Jan 21 2020 at 12:05)</a>:</h4>
<p>This is the same term that rustc uses for a similar concept</p>



<a name="186176392"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/hir%3F/near/186176392" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/hir.3F.html#186176392">(Jan 21 2020 at 12:05)</a>:</h4>
<p>Although, I actually like the new Kotlin term better: fir, where f stands for front-end</p>



<a name="186176452"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/hir%3F/near/186176452" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/hir.3F.html#186176452">(Jan 21 2020 at 12:06)</a>:</h4>
<p>In general, the boundary around hir is much fuzzier than the boundary around syntax/macro expansion</p>



<a name="186176474"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/hir%3F/near/186176474" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/hir.3F.html#186176474">(Jan 21 2020 at 12:06)</a>:</h4>
<p>Basically, everything whidh is above syntax and below specifc IDE features gets stuffed into <code>hir</code></p>



<a name="186178909"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/hir%3F/near/186178909" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> std::Veetaha <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/hir.3F.html#186178909">(Jan 21 2020 at 12:47)</a>:</h4>
<p>I am used to the abbreviation IL for intermediate language, though thanks for the clarification</p>



<a name="186179616"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/hir%3F/near/186179616" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/hir.3F.html#186179616">(Jan 21 2020 at 12:57)</a>:</h4>
<p>well, high-level intermediate <em>representation</em> ;) ours isn't really a language anyway</p>



<a name="186182623"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/hir%3F/near/186182623" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/hir.3F.html#186182623">(Jan 21 2020 at 13:35)</a>:</h4>
<p><span class="user-mention" data-user-id="129457">@Florian Diebold</span> <strong>wow</strong>, TIL that <code>r</code> in hir and mir does not stand for a language. Kind-of obvious in a hindsight</p>



<a name="186199158"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/hir%3F/near/186199158" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> std::Veetaha <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/hir.3F.html#186199158">(Jan 21 2020 at 16:22)</a>:</h4>
<p>And could you please also clarify where do the letters of <code>rowan</code> come from? <span class="user-mention" data-user-id="133169">@matklad</span></p>



<a name="186199339"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/hir%3F/near/186199339" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/hir.3F.html#186199339">(Jan 21 2020 at 16:23)</a>:</h4>
<p>rowan is based on swift libsyntax, which is based on Roslyn syntax trees. The Roslyn used red/green terminology to refer to node cursor/immutable nodes</p>



<a name="186199424"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/hir%3F/near/186199424" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/hir.3F.html#186199424">(Jan 21 2020 at 16:24)</a>:</h4>
<p>and rowan is a red-green tree: <a href="https://en.wikipedia.org/wiki/Rowan#/media/File:Rowan_tree_20081002b.jpg" target="_blank" title="https://en.wikipedia.org/wiki/Rowan#/media/File:Rowan_tree_20081002b.jpg">https://en.wikipedia.org/wiki/Rowan#/media/File:Rowan_tree_20081002b.jpg</a></p>



<a name="186199634"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/hir%3F/near/186199634" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> std::Veetaha <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/hir.3F.html#186199634">(Jan 21 2020 at 16:26)</a>:</h4>
<p>Oh, right, didn't expect rowan to be an independent word, but now it makes an elegant sense</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>